-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
fix(firefox): handle null args in FirefoxOptions.merge() (#15991) #16043
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
User description
🔗 Related Issues
Fixes #15991
💥 What does this PR do?
Adds a null check to prevent a NullPointerException in FirefoxOptions.merge() when merging user-defined moz:firefoxOptions.
The issue occurred because .contains(...) was called on a null list when "args" was present but not properly initialized. This fix ensures the list is not null before using it.
🔧 Implementation Notes
Used a simple null check before iterating over arguments:
if (arguments != null) {
...
}
PR Type
Bug fix
Description
Fix NullPointerException in FirefoxOptions.merge() method
Add null checks before accessing existing arguments list
Prevent crashes when merging user-defined moz:firefoxOptions
Changes diagram
Changes walkthrough 📝
FirefoxOptions.java
Add null safety to argument merging
java/src/org/openqa/selenium/firefox/FirefoxOptions.java